<template>
  <div>
    <InfoHR title='集成JavaSDK' />
    <h3>引入sdk依赖</h3>
    <p  style="white-space: pre-wrap;">{{ pomXml }}</p>
    <h3>使用提供的SDK生成短链</h3>
    <p  style="white-space: pre-wrap;">{{ use }}</p>
  </div>
</template>

<script setup>
import InfoHR from '@/views/urlshorten/useApi/components/infoHR.vue';

let pomXml =
"<dependency>\n" +
  "    <groupId>com.tiantian.lianhui.sdk</groupId>\n" +
  "    <artifactId>lianhui-cloud-sdk</artifactId>\n" +
  "    <version>1.0</version>\n" +
  "</dependency>"

let use = "public class CreateShortLineDemo {\n" +
  "    public static void main(String[] args) {\n" +
  "        ShortLinkRequest shortLinkRequest = ShortLinkRequest.builder()\n" +
  "                .ak(\"uphjfgpSsdfgZDFHGfgsDTewrtt94856\")\n" +
  "                .gid(\"默认分组\")\n" +
  "                .originUrl(\"https://gitee.com/tiantian17/lianhui-cloud\")\n" +
  "                .build();\n" +
  "        ShortLinkResponse shortLink = ShortLinkClient.createShortLink(shortLinkRequest);\n" +
  "        System.out.println(\"shortLink.getCode() = \" + shortLink.getCode());\n" +
  "        System.out.println(\"shortLink.getUrl() = \" + shortLink.getUrl());\n" +
  "        System.out.println(\"shortLink.getErrorMsg() = \" + shortLink.getErrorMsg());\n" +
  "    }\n" +
  "}"
</script>

<style scoped lang='less'>

</style>